/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { StyleSheet } from 'react-native';
import { DEFAULT_HEADER_HEIGHT, DEFAULT_CLOSE_BUTTON_SIZE } from './constants';

export const styles = StyleSheet.create({
  backdrop: {
    bottom: 0,
    left: 0,
    position: 'absolute',
    right: 0,
    top: 0,
    zIndex: 999,
  },

  container: {
    alignItems: 'center',
    bottom: 0,
    justifyContent: 'center',
    left: 0,
    pointerEvents: 'box-none',
    position: 'absolute',
    right: 0,
    top: 0,
    zIndex: 1000,
  },

  sheet: {
    backgroundColor: '#fff',
    borderRadius: 8,
    elevation: 8,
    overflow: 'hidden',
    shadowColor: '#000',
    shadowOffset: {
      width: 0,
      height: 4,
    },
    shadowOpacity: 0.3,
    shadowRadius: 8,
    zIndex: 1001, 
  },

  header: {
    alignItems: 'center',
    backgroundColor: '#fff',
    borderBottomColor: '#e0e0e0',
    borderBottomWidth: StyleSheet.hairlineWidth,
    flexDirection: 'row',
    height: DEFAULT_HEADER_HEIGHT,
    justifyContent: 'space-between',
    paddingHorizontal: 16,
  },

  title: {
    color: '#000',
    flex: 1,
    fontSize: 18,
    fontWeight: '600',
  },

  closeButton: {
    alignItems: 'center',
    borderRadius: DEFAULT_CLOSE_BUTTON_SIZE / 2,
    height: DEFAULT_CLOSE_BUTTON_SIZE,
    justifyContent: 'center',
    width: DEFAULT_CLOSE_BUTTON_SIZE,
  },

  closeIcon: {
    fontSize: 48,
    fontWeight: '300',
  },

  leftButtonContainer: {
  alignItems: 'flex-start',
  height: DEFAULT_CLOSE_BUTTON_SIZE,
  justifyContent: 'center',
  width: DEFAULT_CLOSE_BUTTON_SIZE,
},
// 右侧按钮容器
rightButtonContainer: {
  alignItems: 'flex-end',
  height: DEFAULT_CLOSE_BUTTON_SIZE,
  justifyContent: 'center',
  width: DEFAULT_CLOSE_BUTTON_SIZE,
},

  leftButton: {
    alignItems: 'center',
    borderRadius: DEFAULT_CLOSE_BUTTON_SIZE / 2,
    height: DEFAULT_CLOSE_BUTTON_SIZE,
    justifyContent: 'center',
    width: DEFAULT_CLOSE_BUTTON_SIZE,
  },

  rightButton: {
    alignItems: 'center',
    borderRadius: DEFAULT_CLOSE_BUTTON_SIZE / 2,
    height: DEFAULT_CLOSE_BUTTON_SIZE,
    justifyContent: 'center',
    width: DEFAULT_CLOSE_BUTTON_SIZE,
  },

  tabBar: {
    backgroundColor: '#fff',
    borderBottomColor: '#e0e0e0',
    borderBottomWidth: StyleSheet.hairlineWidth,
  },

  contentContainer: {
    flexShrink: 1,
  },
});
